// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// import axios from 'axios'
import VueClipboard from 'vue-clipboard2'
import MuseUI from 'muse-ui';
import 'muse-ui/dist/muse-ui.css';
// import Vuex from 'vuex'
import axios from 'axios';
import VueAxios from 'vue-axios';
import VueWechatTitle from 'vue-wechat-title';
import $cookie from 'vue-cookie';
import Loading from 'muse-ui-loading';
Vue.use($cookie);
Vue.use(MuseUI);
Vue.use(Loading);
Vue.config.productionTip = false;
Vue.use(VueClipboard);
Vue.use(VueWechatTitle);
Vue.use(VueAxios, axios);
new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>',
});

router.beforeEach((to, from, next) => {
    /* 路由发生变化修改页面title */
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
